/**
 * Created by Administrator on 2014/8/7.
 */
var client ={
    stage:null,
    rect_layer:null,
    mark_layer:null,

    center_data:null,
    head_data:null,
    foot_data:null,
    side_data:null,

    center:null,
    head:null,
    foot:null,
    left_side:null,
    right_side:null
}

var config = {
    DATA_OF_RECT_SET: null, // 当前裱件的矩形部件参数集
    DATA_OF_PATH_SET: null, // 当前裱件的path部件参数集
    DATA_OF_TEXT_SET: null, // 当前裱件的文本部件参数集
    MIN_ZOOM: 0.5, // 最小放大倍数
    MAX_ZOOM: 4, // 最大放大倍数

    TEMP_CONTAINTER: null,

    CTX : null,
    CANVAS: null,
    IS_MARK:0,
    TYPE: 0,

    UNIT_CHI: 0,
    UNIT_METER: 1,
    CURRENT_UNIT: 0,
    UNIT_RATIO: 3,

    SVG_WIDTH : 500,
    SVG_HEIGHT : 500,

    INIT_CENTER_WIDTH : 200,
    INIT_CENTER_HEIGHT : 300,
    INIT_SIDE_WIDTH : 20,
    INIT_HEAD_HEIGHT : 50,
    INIT_FOOT_HEIGHT : 30,
    INIT_SIDE_COLOR : "#666666",
    INIT_HEAD_COLOR : "#666666",
    INIT_FOOT_COLOR : "#666666",

    HEAD: {
        src:"images/top.png",
        x:0,
        y:0,
        width:0,
        height:0
    },
    FOOT: {
        src:"images/bottom.png",
        x:0,
        y:0,
        width:0,
        height:0
    },
    CENTER: {
        src:"images/center.png",
        x:0,
        y:0,
        width:0,
        height:0
    },
    LEFT: {
        src:"images/side.png",
        x:0,
        y:0,
        width:0,
        height:0
    },
    RIGHT: {
        src:"images/side.png",
        x:0,
        y:0,
        width:0,
        height:0
    },

    MARK: null,
    TEXT_WIDTH_HEAD: null,
    TEXT_WIDTH_SIDE: null,
    TEXT_WIDTH_CENTER: null,
    TEXT_HEIGHT_HEAD: null,
    TEXT_HEIGHT_FOOT: null,
    TEXT_HEIGHT_SIDE: null
}

var data = {
    pic_w: 200,
    pic_h: 300,
    side_w: 20,
    head_h: 100,
    foot_h: 50,
    side_color: "#666666",
    head_color: "#666666",
    foot_color: "#666666",

    stick: 10
}